<?php
namespace app\admin\api;

use think\Controller;
use \think\Session;
use app\admin\common\Http\ConferenceHttpClient;

//常用字段接口类接口类
class Dict extends ConferenceHttpClient
{

    /**
     * 获取性别字典项
     * @return [type] [description]
     */
    public function gender()
    {
        //获取数据
        $url = 'http://cc-api.85do.com/dict/genders';

        //请求接口信息
        $result = $this->get($url);

        if ($result->code == 0){
            return $result->data;

        }else{
            return $result->message;
        }
    }

    /**
     * 获取国家字典项
     * @return [type] [description]
     */
    public function countries()
    {
        //获取数据
        $url = 'http://cc-api.85do.com/dict/countries';

        //请求接口信息
        $result = $this->get($url);

        if ($result->code == 0){
            return $result->data;

        }else{
            return $result->message;
        }
    }

    /**
     * 获取货币字典项
     * @return [type] [description]
     */
    public function curren()
    {
        //获取数据
        $url = 'http://cc-api.85do.com/dict/currencies';

        //请求接口信息
        $result = $this->get($url);

        if ($result->code == 0){
            return $result->data;

        }else{
            return $result->message;
        }
    }

    /**
     * 获取头衔字典项
     * @return [type] [description]
     */
    public function title()
    {
        //获取数据
        $url = 'http://cc-api.85do.com/dict/titles';

        //请求接口信息
        $result = $this->get($url);

        if ($result->code == 0){
            return $result->data;

        }else{
            return $result->message;
        }
    }

    /**
     * 获取论文报告方式字典项
     * @return [type] [description]
     */
    public function paperpostwany()
    {
        //获取数据
        $url = 'http://cc-api.85do.com/dict/paper/presentation-preferences';

        //请求接口信息
        $result = $this->get($url);

        if ($result->code == 0){
            return $result->data;

        }else{
            return $result->message;
        }
    }





}